//
//  UIViewController+StoryBoard.h
//  duzhoumo
//
//  Created by 度周末网络-王腾 on 15/11/10.
//  Copyright © 2015年 dzmmac. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIViewController (StoryBoard)

/**
 *  获取StoryBoard 入口视图控制器
 *
 *  @param sbName StoryBoard 名称
 *
 *  @return  viewController
 */
+(UIViewController *)getInitialViewControllerFromSbName:(NSString *)sbName;

/**
 *  根据viewControllerName 获取 StoryBoard 中的视图控制器
 *
 *  @param sbName  StoryBoard 名称
 *  @param vcName viewController 名称
 *
 *  @return  viewController
 */
+(UIViewController *)getViewControllerFromSbName:(NSString *)sbName viewControllerName:(NSString *)vcName;

/**
 *  导航层级中是否包含指定的ViewController
 *
 *  @param viewControllerName
 *
 *  @return 如果存在返回该ViewController、否则返回nil
 */
-(UIViewController *)isContaintViewConttoller:(NSString *)viewControllerName;

/**
 *  返回指定的vc 如果存在则返回  否则根据isRoot 返回
 *
 *  @param viewControllerName  viewControllerName
 */
-(void)backCustomViewController:(NSString *)viewControllerName isRoot:(BOOL)isRoot;


/**
 *  GCD延时调用
 *
 *  @param timerInterval 时长秒
 *  @param block         延时后的block
 */
-(void)afterDelay:(NSTimeInterval )timerInterval block:(void (^)())block;

@end
